import java.util.Scanner;
public class _3 {

    public static void main(String[] args){
        Scanner sc =new  Scanner(System.in);
        System.out.println("计算一个数的阶乘");
        System.out.print("请输入一个数：");
        int a =sc.nextInt();
        int sum=1;
        for(int i=a;i>0;i--){
            sum *= i;
        }
        System.out.println(a+"！="+sum);
    }
}
